package cn.lxh.controller.app;

import cn.lxh.pojo.dto.DriverPointDto;
import cn.lxh.result.JSONResult;
import cn.lxh.service.IDriverPointService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author lxh Create Time: 2024/1/12 13:02
 * DriverPointController控制层
 */
@RestController
@RequestMapping("/app/bigdata")
public class DriverPointController {

    @Autowired
    private IDriverPointService driverPointService;
    @Operation( summary= "司机坐标保存到HBase",description = "司机坐标保存到HBase")
    @Parameter(name = "driverPointDto",description = "司机坐标参数",required = true)
    @PostMapping("/driverLocationToHBase")
    public JSONResult driverLocationToHBase(@RequestBody @Validated DriverPointDto driverPointDto){
        return JSONResult.success(driverPointService.driverLocationToHBase(driverPointDto));
    }
}
